package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* Created by Mybatis Generator on 2023/12/15
*/
@Data
@ApiModel("Mood tracker has a 7 day user journey, where, On the end of 7th day journey, user calculates the severity level for that week based on their average score for the past 7 days, and system determines which app flow the user takes. Get data from tbl_think_well_mood_score. " +
        "total_weightage = sum(weight) from tbl_think_well_daily_weight " +
        "total_mood_score = sum(mood_score) from tbl_think_well_mood_score " +
        "mood_score = weekly_total_mood_score / weekly_total_weightage " +
        "severity_level,weekly_severity_result: " +
        "mood_score  = 1.0 – 2.08 => level : 1, result = Normal " +
        "mood_score  = 2.09 – 2.17 => level : 2, result = Mild " +
        "mood_score  = 2.18 – 2.91 => level : 3, result = Moderate " +
        "mood_score  = 2.92 – 4.0 => level : 4, result = Severe")
@Table(name = "tbl_think_well_weekly_mood_score")
@NoArgsConstructor
@AllArgsConstructor
public class TblThinkWellWeeklyMoodScore extends BaseEntity {
    @Column(name = "mood_score_id")
    private String moodScoreId;

    @Column(name = "member_id")
    private String memberId;

    @Column(name = "start_date")
    private Date startDate;

    @Column(name = "end_date")
    private Date endDate;

    @Column(name = "total_weightage")
    private BigDecimal totalWeightage;

    @Column(name = "total_mood_score")
    private BigDecimal totalMoodScore;

    @Column(name = "mood_score")
    private BigDecimal moodScore;

    @Column(name = "severity_level")
    private Integer severityLevel;

    @Column(name = "severity_result")
    private String severityResult;
}